DOWNLOAD_URL=https://github.com/aristocratos/btop/releases/download/v1.2.10/btop-x86_64-linux-musl.tbz
LOCAL_FD=${HOME}/temp/download
REFRESH_DOWNLOAD=$1
if [[ ! -d ${LOCAL_FD} ]]
then
  mkdir -p ${LOCAL_FD}
fi
if [[ "${REFRESH_DOWNLOAD}" == "true" && -f ${LOCAL_FD}/${DOWNLOAD_URL##*/} ]]
then
  rm -rf ${LOCAL_FD}/${DOWNLOAD_URL##*/}
fi
if [[ ! -f ${LOCAL_FD}/${DOWNLOAD_URL##*/} ]]
then
  wget -vP ${LOCAL_FD} ${DOWNLOAD_URL}
fi
FOLDER_NAME=${DOWNLOAD_URL##*/}
FOLDER_NAME=${FOLDER_NAME%.*}
echo ${FOLDER_NAME}
if [[ ! -d ${HOME}/temp/github/${FOLDER_NAME} ]]
then
  mkdir -p ${HOME}/temp/github/${FOLDER_NAME}
fi
tar -xvf ${LOCAL_FD}/${DOWNLOAD_URL##*/} -C ${HOME}/temp/github/${FOLDER_NAME}
cd ${HOME}/temp/github/${FOLDER_NAME}
sh install.sh
sh setuid.sh

